package code.rocky.chapter08;


import java.util.zip.DataFormatException;

public class Suggest113 {
    public static void main(String[] args) {
        try {
            doStuff(-1);
            doStuff(100);
        }
        catch (Exception e) {
            System.out.println("这里不会到达");
        }
    }

    public static int doStuff(int _p) throws Exception {
        try {
            if (_p < 0) {
                throw new DataFormatException("数据格式错误");
            }
            else {
                return _p;
            }
        }
        catch (Exception e) {
            throw e;
        }
        finally {
            return -1;
        }
    }
}
